package net.neptech.model.workflow;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author Saya
 * @Date 2025/8/22 10:12
 * @Description TODO
 **/

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "message")
@TableName("message")
public class NotificationMessage {
    @TableField("message_id")
    @Id
    @TableId

    @GeneratedValue(strategy = GenerationType.UUID)
    private String messageId;
    /**
     * 类型
     */
    @TableField("type")
    private String type;

    /**
     * 是否已读
     */
    @TableField("has_read")
    private Boolean hasRead;

    /**
     * 用户id
     */
    @TableField("user_id")
    private String userId;

    /**
     * 业务唯一id
     */
    @TableField("biz_unique_id")
    private String bizUniqueId;

    /**
     * 消息参数
     */
    @TableField("param")
    private String param;

    /**
     * 消息内容
     */
    @TableField("content")
    private String content;

    /**
     * 消息头
     */
    @TableField("title")
    private String title;

    /**
     * 流程id
     */
    @TableField("flow_id")
    private String flowId;

    /**
     * 流程实例id
     */
    @TableField("instance_id")
    private String instanceId;
    /**
     * 逻辑删除字段
     */
    @TableField("deleted")
    @Column(name = "deleted")
    private Boolean deleted;
    /**
     * 创建时间
     */
    @TableField("create_time")
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @Column(name = "update_time")
    private Date updateTime;
}
